﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DinnerPartyapplication
{
    public partial class Form1 : Form
    {
        PartyDinner PD;

        public Form1()
        {
            InitializeComponent();
        }

        public void setcheckbox()
        {
            if (checkBox1.Checked == true)
            {
                checkBox1.Checked = false;
            }

            if (checkBox2.Checked == true)
            {
                checkBox2.Checked = false;
            }
        }


        private void button1_Click(object sender, EventArgs e)
        {
            PD = new PartyDinner(Convert.ToInt16(numericUpDown1.Value));

            if (checkBox1.Checked)
            {
                PD.HealthyOption = true; 
            }

            if (checkBox2.Checked)
            {
                PD.FancyDecoration = true;
            }

            textBox1.Text=Convert.ToString(PD.TOTALCOST(PD.HEALTYHOPTIONS(), PD.FANCYDECORATION()));
            setcheckbox();
            

        }

     }
}
